import 'dart:convert';

import 'package:full_display/unit/http/http_callback.dart';
import 'package:full_display/unit/http/http_utils.dart';

class LoginApi {
  Future<void> goLogin(String phone, String password,
      {Success? success, Failure? failure}) async {
    var param = {
      'username': phone,
      'password': password,
      'grant_type': 'password',
    };

    // String s=jsonEncode(param);

    await HttpUtils.instance.post('https://mrjump.po75.com:6240/Token',
        body: param, onSuccess: success, onFailure: failure);
  }
}
